package com.hb.common.enums;

import lombok.Getter;

/**
 * 状态码
 *
 * @author hb
 * @date 2023/04/25
 */
@Getter
public enum ResultCode implements StatusCode{
    SUCCESS(200, "请求成功"),
    FAILED(500, "请求失败"),
    UNZUTHORIZED(403,"登录失败"),
    ACCESSDENIED(403,"没有权限访问"),
    VALIDATE_ERROR(2002, "参数校验失败"),
    RESPONSE_PACK_ERROR(2003, "response返回包装失败"),
    EXISTS_USER(1001, "已存在数据异常");

    private int code;
    private String msg;

    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}

